// /**
//  * Copyright © 2013-2017 Magento, Inc. All rights reserved.
//  * See COPYING.txt for license details.
//  */

//
//  Prototype popup window
//  _____________________________________________

//  Prototype popup window is used to display WYSIWYG
//  ToDo UI: Remove after complete Prototype removing

.popup-window {
    background: @popup__background-color;

    &.dialog {
        z-index: 900 !important;
    }

    .table_window > tbody > tr > td {
        background: @popup__background-color;
        border: 0;
        padding: 0;
    }

    .magento_close {
        &:extend(.ui-dialog .ui-dialog-titlebar-close all);
    }

    .magento_title {
        &:extend(.ui-dialog .ui-dialog-titlebar all);
    }

    .magento-message {
        padding: 0 @popup__padding__horizontal @popup__padding__vertical;
        position: relative;
    }

    .magento_content {
        height: auto !important;

        .buttons-set {
            margin: 0 0 15px;

            button {
                margin-right: 4px;
            }
        }
    }

    .magento_buttons {
        &:extend(.abs-clearfix all);
        padding: 0 @popup__padding__horizontal @popup__padding__vertical;
        text-align: right;

        .ok_button {
            &:extend(.ui-dialog .action-primary all);
            float: right;
            margin: 0 0 0 @popup__padding__horizontal;
        }

        .cancel_button {
            &:extend(.ui-dialog .action-close all);
        }
    }
}

.ui-widget-overlay {
    &:extend(.abs-modal-overlay all);
}

.overlay_magento {
    &:extend(.abs-modal-overlay all);
    z-index: 800 !important;
}

//
//  Old popup window
//  _____________________________________________

//  ToDo UI: old popups should be replaced by jquery UI popup

.fade {
    &:extend(.abs-modal-overlay all);
    z-index: 1000;

    .popup {
        background: @popup__background-color;
        border: 0;
        border-radius: 0;
        display: inline-block;
        left: 12.5%;
        position: absolute;
        text-align: left;
        top: 5rem;
        width: 75%;

        .close {
            &:extend(.ui-dialog .ui-dialog-titlebar-close all);
        }
    }

    .popup-inner {
        padding: 0;
    }

    .popup-title {
        &:extend(.ui-dialog .ui-dialog-titlebar all);
        background: @color-lazy-sun;
        font-size: 1.4rem;
        font-weight: @font-weight__bold;
        padding: 2rem 2rem 0 7.5rem;
    }

    .popup-header {
        .popup-title {
            margin: 0;
        }
    }

    .popup-content {
        &:extend(.abs-clearfix all);
        background: @color-lazy-sun;
        padding: 0 2rem 2rem;

        p {
            margin-top: 0;
        }

        .messages {
            &:last-child {
                margin-bottom: 0;
            }
        }

        .message {
            &:first-child {
                padding-top: 0;

                &:before {
                    top: 0;
                }
            }

            &:last-child {
                padding-bottom: 0;
            }
        }
    }

    .fieldset {
        background: @color-lazy-sun;
        border: 0;
        margin: 1.5rem 0 1.5rem 1.5rem;
        padding: 0;
    }

    .maintenance-checkbox-container {
        padding-left: 20%;
    }

    .messages {
        margin: 0 !important;
    }

    .actions {
        &:extend(.abs-clearfix all);
        margin: 0;
        text-align: right;

        .primary {
            &:extend(.ui-dialog .action-primary all);
            float: right;
            line-height: inherit;
            margin: 0 0 0 @popup__padding__horizontal;

            &:hover {
                box-shadow: none;
            }
        }

        .cancel {
            line-height: inherit;

            &:extend(.ui-dialog .action-close all);
            &:hover {
                box-shadow: none;
            }
        }
    }
}
